<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xml:lang="en" lang="en">
	
	<h:head>
	<script src="js/jquery-1.4.2.min.js"></script>
	<script>
   $(document).ready(function(){
    document.getElementById("form:summary1").value="";
     document.getElementById("form:summary2").value="";
    });
   </script>
   <style>
   li span{
    font-size:15px;
   }
   </style>
	</h:head>
	<body>
		<p>
			<h:form id="form">
			 <div>
			 <span style="color:blue;">发送给：</span><h:outputText value="#{messagemanager.messageuser}"></h:outputText><br />
			<span style="color:blue;">主题：</span> <h:inputTextarea rows="1" cols="145" id="summary1" value="#{messagemanager.messagetitle}" /><br />
            <span style="color:blue;"> 内容：</span><br />
			<h:inputTextarea rows="15" cols="145" id="summary2" value="#{messagemanager.messgecontent}" />
			<br />
				  <div id="but" style="margin: 10px 24px 10px 10px;float:right;">
			 <a4j:commandLink render="table1" action="#{messagemanager.initsavMessage}" >
							<input type="button" value="保存到草稿箱" onclick="window.location.reload();"/>	
							<a4j:param name="messageuser" value="#{messagemanager.messageuser}"
										assignTo="#{messagemanager.messageuser}" />
			 </a4j:commandLink>
			 <a4j:commandLink render="table1" action="#{messagemanager.initaddMessage}" >
							<input type="button" value="发送" onclick="window.location.reload();"/>	
							<a4j:param name="messageuser" value="#{messagemanager.messageuser}"
										assignTo="#{messagemanager.messageuser}" />
			 </a4j:commandLink>
			  
			     </div>
			</div>
				</h:form>
		</p>
	</body>
</html>
